package com.tjtt.gwm.dao;

import java.util.List;
import java.util.Map;

import com.tjtt.gwm.bean.EPInStore;
import com.tjtt.gwm.bean.EquipmentParts;
import com.tjtt.tdm.base.PageResult;
import com.tjtt.tdm.flow.bean.FlowDetailed;
import com.tjtt.tdm.flow.bean.FlowTask;
import com.tjtt.tdm.flow.bean.FlowTaskInfo;
import com.tjtt.tdm.system.bean.Organization;
import com.tjtt.tdm.system.bean.Users;

public interface EquipmentPartsDao {
	
	public PageResult queryDataList(Map filterMap);
	
	public PageResult queryCGDataList(Map filterMap);
	public EquipmentParts queryDataById(String id);
	
	public void addepInStore(EPInStore epis);
	public void addEquipmentParts(EquipmentParts ep);
	
	public PageResult  queryEPDataListByids(Map filterMap);
	
	public EPInStore queryEPInStoreByMainId(String mainid);
	public String queryMaxRKNo();
	
	public EPInStore queryEPINfoByEPIdAndNo(String id);
	public EPInStore  queryEPINfoByEPId(String id);
	public void updateEPINfoByEPIdAndNo(EPInStore epis);
	
	public List<EPInStore>  queryEPINfoByEPInNo(String instoreNo);
	
	public void updateEquipmentParts(EquipmentParts ep);
	//删除冗余数据
	public void deleteEPInData(EPInStore ep);
	//根据备件id查询备件信息（其中仓库，供应商和备件以id形式存储）
	public EquipmentParts queryEPDataById(String id);
	
    //根据用户id查询用户姓名
	public Users queryUsersName(String id );
	
	//根据部门id查询部门名称
	public  Organization queryOrganizationName(String orgId);
	//查询设备列表
	public PageResult queryEP(Map filterMap);
	//查询供应商列表
	public PageResult queryGYS(Map filterMap);
	//获得最大的备件id
	public String queryMaxEPNo();
	
	//依据备件id查询原数据（供应商、设备和部门已id形式存储）
	public EquipmentParts queryEPYuanListById(String id);
	
	public PageResult queryEquRelationByID(Map filterMap);
	
	//根据表名和对象id获取flowtaskId
    public List getFlowtaskId(String tablename,String mainid);
    
    // 获取FlowTaskInfo对象
    public FlowTaskInfo getFlowTaskInfo(String flowTaskId);
    
     // 保存FlowTaskInfo对象
     public void updateFlowTaskInfo(FlowTaskInfo flowTaskInfo);
     
     //获取flowtask对象
     public FlowTask getFlowTask(String id);
     
      //更新flowtask对象
     public void updateFlowTask(FlowTask f);
     
	 //获取FlowDetailed对象
	public FlowDetailed getFlowDetailed(String flowTaskId);
	
	//更新FlowDetailed对象
	public void updateFlowDetailed(FlowDetailed f);
	// 根据sql语句查询数据
	public List queryDataBySql(String sql);

}
